POV-Ray : Newsgroups : povray.general : I need a little math help : Re: I need a little math help Server Time
9 Aug 2024 23:23:38 EDT (-0400)
  Re: I need a little math help  
From: Chris Colefax
Date: 23 Apr 2000 23:34:09
Message: <3903c0b1@news.povray.org>
Phil Clute <pcl### [at] tiacnet> wrote:
> I can't remember how to determine the new x y coordinates in a
> circle and it's been a while since I've done any real math, so trying
> to work the problem by myself has resulted in failure...
>
> If I have a radius of 10(pov units)and the line is then rotated by
> say 45degrees(or whatever angle I need), what is the new <x,y>?
> I can't remember the formula for it...
>
> I could just translate the object along x and then rotate around z,
> but I kind of need the math to find it's new postion.

#declare NewPos = Radius*<cos(radians(Angle)), sin(radians(Angle))>;

Note that at Angle=0 you get <Radius, 0>, while at Angle=90 you get <0,
Radius> (i.e. the rotation is anti-clockwise around the z-axis, starting at
the positive x-axis).


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.